﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gl_mes.DAL.MesDB
{
    /// <summary>
    /// 检验单明细
    /// </summary>
    [Table("inspect_detail")]
    public class InspectDetail
    {
        /// <summary>
        /// ID，主键自增长
        /// </summary>
        [Column("id"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }


        /// <summary>
        /// 表头ID（即InspectInfo表ID）
        /// </summary>
        [Column("head_id")]
        public int HeadID { get; set; }


        /// <summary>
        /// 检验单单号
        /// </summary>
        [Column("inspect_no")]
        public string InspectNumber { get; set; }

        
        /// <summary>
        /// 目标工单（targetProdProcess表）的ID
        /// </summary>
        [Column("pp_id")]
        public int ProdID { get; set; }

        /// <summary>
        /// 工单号
        /// </summary>
        [Column("prod_number")]
        public string ProdNumber { get; set; }


        /// <summary>
        /// 站点ID
        /// </summary>
        [Column("site_id")]
        public int SiteID { get; set; }


        /// <summary>
        /// 站点名称
        /// </summary>
        [Column("site_name")]
        public string SiteName { get; set; }


        /// <summary>
        /// 不合格数量
        /// </summary>
        [Column("fail_qty")]
        public decimal FailQty { get; set; }

        /// <summary>
        /// 原因ID
        /// </summary>
        [Column("reason_id")]
        public int? ReasonID { get; set; }

        /// <summary>
        /// 原因名称
        /// </summary>
        [Column("reason_name")]
        public string ReasonName { get; set; }

        /// <summary>
        /// 图片1
        /// </summary>
        [Column("pic_01")]
        public byte[] Pic01 { get; set; }


        /// <summary>
        /// 图片2
        /// </summary>
        [Column("pic_02")]
        public byte[] Pic02 { get; set; }


        /// <summary>
        /// 备注
        /// </summary>
        [Column("remark")]
        public string Remark { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; }

        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime? CreateDate { get; set; }
    }
}
